﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UnitManager.aspx.cs" Inherits="Product_UnitManager" %>
<%@ Import Namespace="WX.WMS.DataModel" %>
<%@ Import Namespace="WX.WMS.BLL" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>计量单位信息维护</title>
    <link href="../css/base.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div style=" margin:0 auto; text-align:center;">
        <table style="width: 862px; height: 193px">
            <tr>
                <td style=" height: 105px">

                    <div style="border-right: #a4d5e3 1px solid; border-top: #a4d5e3 1px solid; background: url(../images/content_bg1.gif) repeat-x 50% bottom;
                         margin-bottom: 28px; border-left: #a4d5e3 1px solid; 
                        border-bottom: #a4d5e3 1px solid; ">
                        <h2 style="padding-right: 0px; padding-left: 8px; font-size: 14px; background: #e2f3fa;
                            padding-bottom: 0px; margin: 0px; color: #0066a9; line-height: 24px; padding-top: 0px;
                            border-bottom: #a4d5e3 1px solid">
                            计量单位添加/修改</h2>
                        <div style="margin: 5px">
                            <table style="width: 705px; height: 46px">
                                <tr>
                                    <td style="width: 13%; height: 45px">
                                        单位类型</td>
                                    <td style="width: 21%; height: 45px">
                                        <asp:DropDownList ID="ddlType" runat="server"></asp:DropDownList></td>
                                    <td style="width: 9%; height: 45px">
                                        单位名称</td>
                                    <td style=" height: 45px; text-align:left;">
                                        <asp:TextBox ID="txtUnitName" runat="server" Width="103px"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtUnitName"
                                            ErrorMessage="<img src=../images/false.gif  />不能为空"></asp:RequiredFieldValidator>
                                        <asp:Button ID="updateButton" runat="server" OnClick="updateButton_Click" Text="新  添"
                                            Width="87px" />
                                            </td>
                                            <td>
                                                &nbsp;</td>
                                </tr>
                                </table>
                        </div>
                     <div style="margin: 5px">   
                      <asp:GridView ID="SearchResult" runat="server" AutoGenerateColumns="False" 
                        BackColor="White" AllowPaging="True"
                        BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                        Width="100%" DataKeyNames="ID" 
                                     onpageindexchanging="SearchResult_PageIndexChanging"  >
                        <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
                        <Columns>
                            <asp:TemplateField HeaderText="类型" SortExpression="Type">
                                 <ItemTemplate>
                                    <%# Enum.GetName(typeof(Enumerations.UnitType),((WX.WMS.DataModel.T_UNIT)Container.DataItem).Type)%>
                                 </ItemTemplate>                 
                            </asp:TemplateField>
                            <asp:BoundField DataField="NAME" HeaderText="名称" SortExpression="NAME" />
                            <asp:HyperLinkField DataNavigateUrlFields="ID" DataNavigateUrlFormatString="UnitManager.aspx?action=edit&amp;ID={0}"
                                HeaderText="编辑" Text="&lt;img border=0 src=../images/Edit.gif /&gt;">
                                <ItemStyle Width="30px" />
                            </asp:HyperLinkField>
                            <asp:HyperLinkField DataNavigateUrlFields="ID" DataNavigateUrlFormatString="UnitManager.aspx?action=del&amp;ID={0}"
                                HeaderText="删除" Text="&lt;img border=0 src=../images/Close.gif /&gt;">
                                <ItemStyle Width="30px" />
                            </asp:HyperLinkField>
                        </Columns>
                        <RowStyle BackColor="White" ForeColor="#003399" />
                        <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                        <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
                        <HeaderStyle BackColor="#E2F3FA" Font-Bold="True" ForeColor="Black" />
                     </asp:GridView>   

                    </div>
                      </div>
                </td>
            </tr>
        </table>
    
    </div>
    </form>
</body>
</html>
